﻿using System;

namespace WhileLoop
{
    class Program
    {
        static void Main(string[] args)
        {
            /*
            if (true)
            {
                Console.WriteLine("true");
            }
            */

            /*
            // infinite loop
            while (true) 
            {
                Console.WriteLine("true");
            }
            */
            bool condition = true;

            while (condition)
            {
                condition = false;
            }

            int x = 1;

            while (x <= 3)
            {
                Console.WriteLine(x);
                x = x + 1;
            }

            /******************************/
            Console.WriteLine("---------------------");

            int i = 1; // int i = 0;
            Console.Write("n = ");
            int n = int.Parse(Console.ReadLine());

            int a;

            while (i <= n) // while(i < n)
            {
                Console.Write(i + ". enter next number: ");
                a = int.Parse(Console.ReadLine());
                Console.WriteLine(a + "^2 = " + a * a);

                i = i + 1;
            }

            
        }
    }
}
